#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int Fun(int n)
{
    int a = 0;
    int b = 1;
    int c = 0;
    for (int i = 2; i <= n; i++)
    {
        c = a + b;
        a = b;
        b = c;


    }
    if (n <= 2)
        return 1;
    return c;
}


int main()
{
    int i;
    scanf("%d", &i);
    printf("%d", Fun(i));
}